/*
Landon Schnabel	
Proposal title: Americans' Views on Refusal of Services to Same-Sex Couples and Interracial Couples

HYPOTHESES

Stated-Hyp1: Views about service refusal will be favorable for gay couple vs. interracial couple (p. 1)

	Test-Hyp1: Respondents will be more likely to favor service refusal for a gay vs. inter-racial couple.

Stated-Hyp2: For gay couples, views about service refusal will be favorable in case of refusal for religious vs. non-religious reasons 

	Test-Hyp2: Within gay couples, respondents will be more likely to favor service refusal for religious vs. non-religious reasons.

Stated-Hyp3: For inter-racial couples, views about service refusal will be no different in case of refusal for religious vs. non-religious reasons 
	
	Test-Hyp3: Within inter-racial couples, respondents will not differ in support for service refusal for religious vs. non-religious reasons.	

	
Stated-Hyp4: Views about service refusal will be more favorable for self employed individuals  vs. closely held corporation, especially on religious grounds.

	Test-Hyp4: Respondents will be more likely to favor service refusal for self-employed individuals vs. closely held corporations.

	Test-Hyp5: Respondents will be more likely to favor service refusal for self-employed individuals vs. closely held corporations; this effect will be moderated by religious refusal

********************************************************************************
NOTES
- The main outcome is dichotomous, there is a follow-up question about strength of feeling, but that only applies to the sub-sample that answered the main question in a particular way. We are only using the dichotomous measure.
*/

clear all
use "SchnabelB47.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* gay vs. inter-racial
	tab XTESS184
	recode XTESS184 (1/4=1 "1 gay") (5/8=0 "0 inter-racial"), gen(treat_gay)
	tab treat_gay
	
* religious vs. non-religious	
	tab XTESS184
	recode XTESS184 (1 3 5 7 =1 "1 religious refusal") (2 4 6 8=0 "0 non-religious refusal"), gen(treat_religious)
	tab treat_religious
	
* self-employed vs. corporation
	tab XTESS184
	recode XTESS184 (3 4 7 8 =0 "0 corporation") (1 2 5 6 =1 "1 self-employed"), gen(treat_selfemployed)
	tab treat_selfemployed
	
* OUTCOME MEASURES

// Q1: should x be allowed to refuse service or not?

	tab Q1
	recode Q1 (-1=.) (1=1 "1 yes") (2=0 "0 no"), gen(allow_refusal)
	tab allow_refusal

	
********************************************************************************

* ANALYSIS
	

*	Test-Hyp1: Respondents will be more likely to favor service refusal for a gay vs. inter-racial couple.

	reg allow_refusal i.treat_gay
	// do not reject. 0.000
	tess 1.treat_gay +, init(SchnabelB47)
	
*	Test-Hyp2: Within gay couples, respondents will be more likely to favor service refusal for religious vs. non-religious reasons.

	reg allow_refusal i.treat_religious if treat_gay==1
	// reject. 0.666
	tess 1.treat_religious +

*	Test-Hyp3: Within inter-racial couples, respondents will not differ in support for service refusal for religious vs. non-religious reasons.	

	reg allow_refusal i.treat_religious if treat_gay==0
	// reject. 0.036	[null hyp was that the effect won't be significant]
	tess 1.treat_religious
	
*	Test-Hyp4: Respondents will be more likely to favor service refusal for self-employed individuals vs. closely held corporations.

	reg allow_refusal i.treat_selfemployed
	// do not reject. 0.000
	tess 1.treat_selfemployed +

*	Test-Hyp5: Respondents will be more likely to favor service refusal for self-employed individuals vs. closely held corporations.

	reg allow_refusal i.treat_selfemployed##i.treat_religious
	// do not reject. 0.000
	tess 1.treat_selfemployed#1.treat_religious +
